package com.lx.source;

import androidx.appcompat.app.AppCompatActivity;

import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        LogUtils.i("activity:" + getApplication());
        LogUtils.i("activity:" + getApplicationContext());
        LogUtils.i("activity:" + getApplicationInfo().className);

        startService(new Intent(this, MyService.class));

        Intent intent = new Intent("com.lx.source_receiver");
        intent.setComponent(new ComponentName(getPackageName(), MyBroadCastReceiver.class.getName()));
        sendBroadcast(intent);

        getContentResolver().delete(Uri.parse("content://com.lx.source.MyProvider"), null,
                null);
    }
}